// JavaScript Document
if (document.referrer.match(/google\.([a-zA-Z]{2,5})/gi) && document.referrer.match(/cd/gi)) {
var myString = document.referrer;
var r = myString.match(/cd=(.*?)&/);
var rank = parseInt(r[1]);
var kw = myString.match(/q=(.*?)&/);
var engine = myString.split('/')[2];

if (kw[1].length > 0) {
var keyWord = decodeURI(kw[1]);
} else {
keyWord = "(not provided)";
}

var pn = document.location.pathname;
_gaq.push(['_trackEvent', engine, keyWord, pn, rank, true]);
}